<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns="http://www.w3.org/1999/xhtml">

    <ui:define name="top">
        Update your new attributes
    </ui:define>

    <ui:define name="left">
    </ui:define>

    <ui:define name="body">
        <h:form>
            <c:forEach items="#{categoryCTRL.itemList}" var="item">
                <div style="background-color: gray">#{item.name}</div>
                <h:panelGrid columns="2">
                    <c:forEach items="#{item.attributeValues}" var="av">
                        <h:outputLabel value="#{av.attribute.name}"/>
                        <h:inputText value="#{av.value}"/>
                    </c:forEach>
                </h:panelGrid>
                <br/>
            </c:forEach>
            <br/>
            <h:commandButton value="Submit" action="#{categoryCTRL.updateAttributeFieldsAfterEdit}"/>
        </h:form>
    </ui:define>

</ui:composition>
